package com.sin.j2me.wihd.model;

import com.sin.j2me.framework.SinUtil;
import com.sin.j2me.util.Stack;

public class Param {
	private Stack keys = null;
	private Stack vals = null;
	public Param() {
		keys = new Stack();
		vals = new Stack();
	}

	
	public int addPam(String key, String val){
		keys.push(key);
		vals.push(val);
		return keys.size();
	}
	
	public int size(){
		return keys.size();
	}
	
	public String getPam(int ix){
		String key = (String) keys.get(ix);
		String val = (String) vals.get(ix);
		if(val == null)
			val = "null";
		return key + "=" + SinUtil.URLEncode(val);
	}
}
